mod model;
mod constant;
mod render;

use crate::{model::UnblockModel, render::UnblockRender};
use log::info;
use std::error::Error;
use tge::game::Game;
use tge::log::init_log;
//use tge::audio::*;

fn main() -> Result<(), Box<dyn Error>> {
    init_log(log::LevelFilter::Info, "log/unblock.log");
    info!("Unblock(tge.rs) start...");
    let mut m = UnblockModel::new();
    let mut r = UnblockRender::new();
    let mut g = Game::new(&mut m, &mut r);
    g.init();
    g.run()?;
    g.render.term.reset(&mut g.context);
    Ok(())
}
